\hypertarget{group__wickr__ephemeral__keypair}{}\section{Wickr\+\_\+ephemeral\+\_\+keypair}
\label{group__wickr__ephemeral__keypair}\index{Wickr\_ephemeral\_keypair@{Wickr\_ephemeral\_keypair}}
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair}}
\begin{DoxyCompactList}\small\item\em Represents a key pair used for message key exchanges within the Wickr Messaging Protocol. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__ephemeral__keypair_gab956214203938b4b02b8f30666eaec3b}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+create}} (uint64\+\_\+t identifier, \mbox{\hyperlink{structwickr__ec__key}{wickr\+\_\+ec\+\_\+key\+\_\+t}} $\ast$ec\+\_\+key, \mbox{\hyperlink{structwickr__ecdsa__result}{wickr\+\_\+ecdsa\+\_\+result\+\_\+t}} $\ast$signature)
\item 
\mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__ephemeral__keypair_gacf14f050221091093b9a2948bd569662}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+copy}} (const \mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}} $\ast$source)
\item 
\mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__ephemeral__keypair_ga6c0935c579e3d4bdbfeada7cb60c2a1b}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+generate\+\_\+identity}} (const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$engine, uint64\+\_\+t identifier, const \mbox{\hyperlink{structwickr__identity}{wickr\+\_\+identity\+\_\+t}} $\ast$identity)
\item 
bool \mbox{\hyperlink{group__wickr__ephemeral__keypair_gadc17110d4c7fa65a9456fae516bf2e5d}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+verify\+\_\+owner}} (const \mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}} $\ast$keypair, const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$engine, const \mbox{\hyperlink{structwickr__identity}{wickr\+\_\+identity\+\_\+t}} $\ast$owner)
\item 
void \mbox{\hyperlink{group__wickr__ephemeral__keypair_ga2e2f8db184aa2972ef5423e9c03988e8}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+make\+\_\+public}} (const \mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}} $\ast$keypair)
\item 
\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__ephemeral__keypair_ga1c994a08f270cc84088263d48a4b3636}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+serialize}} (const \mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}} $\ast$keypair)
\item 
\mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__ephemeral__keypair_ga7ecd3769c68ba5bfbc95a225c1021ed0}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+create\+\_\+from\+\_\+buffer}} (const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$buffer, const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$engine)
\item 
void \mbox{\hyperlink{group__wickr__ephemeral__keypair_gab77107c0b1a0d145c606817eeecec63d}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+destroy}} (\mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}} $\ast$$\ast$keypair)
\end{DoxyCompactItemize}


\subsection{Detailed Description}


\subsection{Function Documentation}
\mbox{\Hypertarget{group__wickr__ephemeral__keypair_gacf14f050221091093b9a2948bd569662}\label{group__wickr__ephemeral__keypair_gacf14f050221091093b9a2948bd569662}} 
\index{Wickr\_ephemeral\_keypair@{Wickr\_ephemeral\_keypair}!wickr\_ephemeral\_keypair\_copy@{wickr\_ephemeral\_keypair\_copy}}
\index{wickr\_ephemeral\_keypair\_copy@{wickr\_ephemeral\_keypair\_copy}!Wickr\_ephemeral\_keypair@{Wickr\_ephemeral\_keypair}}
\subsubsection{\texorpdfstring{wickr\_ephemeral\_keypair\_copy()}{wickr\_ephemeral\_keypair\_copy()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}}$\ast$ wickr\+\_\+ephemeral\+\_\+keypair\+\_\+copy (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}} $\ast$}]{source }\end{DoxyParamCaption})}

Copy an ephemeral keypair


\begin{DoxyParams}{Parameters}
{\em source} & the ephemeral key pair to copy \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated ephemeral key pair holding a deep copy of the properties of \textquotesingle{}source\textquotesingle{} 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__ephemeral__keypair_gab956214203938b4b02b8f30666eaec3b}\label{group__wickr__ephemeral__keypair_gab956214203938b4b02b8f30666eaec3b}} 
\index{Wickr\_ephemeral\_keypair@{Wickr\_ephemeral\_keypair}!wickr\_ephemeral\_keypair\_create@{wickr\_ephemeral\_keypair\_create}}
\index{wickr\_ephemeral\_keypair\_create@{wickr\_ephemeral\_keypair\_create}!Wickr\_ephemeral\_keypair@{Wickr\_ephemeral\_keypair}}
\subsubsection{\texorpdfstring{wickr\_ephemeral\_keypair\_create()}{wickr\_ephemeral\_keypair\_create()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}}$\ast$ wickr\+\_\+ephemeral\+\_\+keypair\+\_\+create (\begin{DoxyParamCaption}\item[{uint64\+\_\+t}]{identifier,  }\item[{\mbox{\hyperlink{structwickr__ec__key}{wickr\+\_\+ec\+\_\+key\+\_\+t}} $\ast$}]{ec\+\_\+key,  }\item[{\mbox{\hyperlink{structwickr__ecdsa__result}{wickr\+\_\+ecdsa\+\_\+result\+\_\+t}} $\ast$}]{signature }\end{DoxyParamCaption})}

Create an Ephemeral Keypair from components


\begin{DoxyParams}{Parameters}
{\em identifier} & the numerical identifier of the keypair \\
\hline
{\em ec\+\_\+key} & an Elliptic Curve public keypair \\
\hline
{\em signature} & a signature of the public key material in \textquotesingle{}ec\+\_\+key\textquotesingle{} by the owner of this key \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated Ephemeral Keypair, owning the properties that were passed in 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__ephemeral__keypair_ga7ecd3769c68ba5bfbc95a225c1021ed0}\label{group__wickr__ephemeral__keypair_ga7ecd3769c68ba5bfbc95a225c1021ed0}} 
\index{Wickr\_ephemeral\_keypair@{Wickr\_ephemeral\_keypair}!wickr\_ephemeral\_keypair\_create\_from\_buffer@{wickr\_ephemeral\_keypair\_create\_from\_buffer}}
\index{wickr\_ephemeral\_keypair\_create\_from\_buffer@{wickr\_ephemeral\_keypair\_create\_from\_buffer}!Wickr\_ephemeral\_keypair@{Wickr\_ephemeral\_keypair}}
\subsubsection{\texorpdfstring{wickr\_ephemeral\_keypair\_create\_from\_buffer()}{wickr\_ephemeral\_keypair\_create\_from\_buffer()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}}$\ast$ wickr\+\_\+ephemeral\+\_\+keypair\+\_\+create\+\_\+from\+\_\+buffer (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{buffer,  }\item[{const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$}]{engine }\end{DoxyParamCaption})}

Create an ephemeral keypair from a buffer that was created with \textquotesingle{}wickr\+\_\+ephemeral\+\_\+keypair\+\_\+serialize\textquotesingle{}


\begin{DoxyParams}{Parameters}
{\em buffer} & the buffer that contains a serialized representation of an identity chain \\
\hline
{\em engine} & the crypto engine to use to import the key components of the ephemeral keypair \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
deserialized ephemeral keypair or null if the deserialization fails 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__ephemeral__keypair_gab77107c0b1a0d145c606817eeecec63d}\label{group__wickr__ephemeral__keypair_gab77107c0b1a0d145c606817eeecec63d}} 
\index{Wickr\_ephemeral\_keypair@{Wickr\_ephemeral\_keypair}!wickr\_ephemeral\_keypair\_destroy@{wickr\_ephemeral\_keypair\_destroy}}
\index{wickr\_ephemeral\_keypair\_destroy@{wickr\_ephemeral\_keypair\_destroy}!Wickr\_ephemeral\_keypair@{Wickr\_ephemeral\_keypair}}
\subsubsection{\texorpdfstring{wickr\_ephemeral\_keypair\_destroy()}{wickr\_ephemeral\_keypair\_destroy()}}
{\footnotesize\ttfamily void wickr\+\_\+ephemeral\+\_\+keypair\+\_\+destroy (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}} $\ast$$\ast$}]{keypair }\end{DoxyParamCaption})}

Destroy an ephemeral keypair


\begin{DoxyParams}{Parameters}
{\em keypair} & a pointer to the key pair to destroy. All properties of \textquotesingle{}$\ast$keypair\textquotesingle{} will also be destroyed \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__wickr__ephemeral__keypair_ga6c0935c579e3d4bdbfeada7cb60c2a1b}\label{group__wickr__ephemeral__keypair_ga6c0935c579e3d4bdbfeada7cb60c2a1b}} 
\index{Wickr\_ephemeral\_keypair@{Wickr\_ephemeral\_keypair}!wickr\_ephemeral\_keypair\_generate\_identity@{wickr\_ephemeral\_keypair\_generate\_identity}}
\index{wickr\_ephemeral\_keypair\_generate\_identity@{wickr\_ephemeral\_keypair\_generate\_identity}!Wickr\_ephemeral\_keypair@{Wickr\_ephemeral\_keypair}}
\subsubsection{\texorpdfstring{wickr\_ephemeral\_keypair\_generate\_identity()}{wickr\_ephemeral\_keypair\_generate\_identity()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}}$\ast$ wickr\+\_\+ephemeral\+\_\+keypair\+\_\+generate\+\_\+identity (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$}]{engine,  }\item[{uint64\+\_\+t}]{identifier,  }\item[{const \mbox{\hyperlink{structwickr__identity}{wickr\+\_\+identity\+\_\+t}} $\ast$}]{identity }\end{DoxyParamCaption})}

Generate a new ephemeral key pair given an owner identity.

This method will use the \textquotesingle{}default\+\_\+curve\textquotesingle{} property of the crypto engine provided as the curve for the resulting keypair


\begin{DoxyParams}{Parameters}
{\em engine} & crypto engine supporting random Elliptic Curve generation, and E\+C\+D\+SA signatures \\
\hline
{\em identifier} & the identifier to assign to the generated output keypair \\
\hline
{\em identity} & the identity to sign the generated output key pair with \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly generated random Elliptic Curve key pair with identifier \textquotesingle{}identifier\textquotesingle{} and a signature using the \textquotesingle{}sig\+\_\+key\textquotesingle{} property of the identity provided as the signing key 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__ephemeral__keypair_ga2e2f8db184aa2972ef5423e9c03988e8}\label{group__wickr__ephemeral__keypair_ga2e2f8db184aa2972ef5423e9c03988e8}} 
\index{Wickr\_ephemeral\_keypair@{Wickr\_ephemeral\_keypair}!wickr\_ephemeral\_keypair\_make\_public@{wickr\_ephemeral\_keypair\_make\_public}}
\index{wickr\_ephemeral\_keypair\_make\_public@{wickr\_ephemeral\_keypair\_make\_public}!Wickr\_ephemeral\_keypair@{Wickr\_ephemeral\_keypair}}
\subsubsection{\texorpdfstring{wickr\_ephemeral\_keypair\_make\_public()}{wickr\_ephemeral\_keypair\_make\_public()}}
{\footnotesize\ttfamily void wickr\+\_\+ephemeral\+\_\+keypair\+\_\+make\+\_\+public (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}} $\ast$}]{keypair }\end{DoxyParamCaption})}

Destroy the private components of the keypair


\begin{DoxyParams}{Parameters}
{\em keypair} & the key pair to make public \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__wickr__ephemeral__keypair_ga1c994a08f270cc84088263d48a4b3636}\label{group__wickr__ephemeral__keypair_ga1c994a08f270cc84088263d48a4b3636}} 
\index{Wickr\_ephemeral\_keypair@{Wickr\_ephemeral\_keypair}!wickr\_ephemeral\_keypair\_serialize@{wickr\_ephemeral\_keypair\_serialize}}
\index{wickr\_ephemeral\_keypair\_serialize@{wickr\_ephemeral\_keypair\_serialize}!Wickr\_ephemeral\_keypair@{Wickr\_ephemeral\_keypair}}
\subsubsection{\texorpdfstring{wickr\_ephemeral\_keypair\_serialize()}{wickr\_ephemeral\_keypair\_serialize()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}}$\ast$ wickr\+\_\+ephemeral\+\_\+keypair\+\_\+serialize (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}} $\ast$}]{keypair }\end{DoxyParamCaption})}

Serialize an ephemeral keypair to bytes


\begin{DoxyParams}{Parameters}
{\em keypair} & the ephemeral keypair to serialize \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a buffer containing a serialized representation of \textquotesingle{}keypair\textquotesingle{} or null if serialization fails 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__ephemeral__keypair_gadc17110d4c7fa65a9456fae516bf2e5d}\label{group__wickr__ephemeral__keypair_gadc17110d4c7fa65a9456fae516bf2e5d}} 
\index{Wickr\_ephemeral\_keypair@{Wickr\_ephemeral\_keypair}!wickr\_ephemeral\_keypair\_verify\_owner@{wickr\_ephemeral\_keypair\_verify\_owner}}
\index{wickr\_ephemeral\_keypair\_verify\_owner@{wickr\_ephemeral\_keypair\_verify\_owner}!Wickr\_ephemeral\_keypair@{Wickr\_ephemeral\_keypair}}
\subsubsection{\texorpdfstring{wickr\_ephemeral\_keypair\_verify\_owner()}{wickr\_ephemeral\_keypair\_verify\_owner()}}
{\footnotesize\ttfamily bool wickr\+\_\+ephemeral\+\_\+keypair\+\_\+verify\+\_\+owner (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__ephemeral__keypair}{wickr\+\_\+ephemeral\+\_\+keypair\+\_\+t}} $\ast$}]{keypair,  }\item[{const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$}]{engine,  }\item[{const \mbox{\hyperlink{structwickr__identity}{wickr\+\_\+identity\+\_\+t}} $\ast$}]{owner }\end{DoxyParamCaption})}

Verify the owner of an ephemeral key pair is a particular identity


\begin{DoxyParams}{Parameters}
{\em keypair} & the key pair to verify the owner of \\
\hline
{\em engine} & a crypto engine that supports verifying signatures generated with the curve associated with the \textquotesingle{}sig\+\_\+key\textquotesingle{} property of owner \\
\hline
{\em owner} & the proposed owner of this keypair \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if the signature of key pair can be verified with the sig\+\_\+key of owner 
\end{DoxyReturn}
